﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class Company : System.Web.UI.Page
{
    public int CompanyId
    {
        get;
        private set;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.CompanyId = int.Parse(Request.QueryString["id"].ToString());
        Connection.cmd = new System.Data.SqlClient.SqlCommand("spGetPhonesByCompanyId", Connection.GetConn());
        Connection.cmd.CommandType = System.Data.CommandType.StoredProcedure;
        Connection.cmd.Parameters.AddWithValue("@companyId", CompanyId);
        SqlDataReader dr = Connection.cmd.ExecuteReader();
        lvShowAllPhones.DataSource = dr;
        lvShowAllPhones.DataBind();
    }
}